/*
 * Created: 2012-04-27
 * sam.huang
 */
;
(function($) {
	$.extend($.fn, {
		requestFullScreen : function() {
			if ($(this).get(0).requestFullscreen) {
				console.log("requestFullscreen");
				$(this).get(0).requestFullscreen();
			} else if ($(this).get(0).mozRequestFullScreen) {
				console.log("mozRequestFullScreen");
				$(this).get(0).mozRequestFullScreen();
			} else if ($(this).get(0).webkitRequestFullScreen) {
				console.log("webkitRequestFullScreen");
				$(this).get(0).webkitRequestFullScreen();
			} else if ($(this).get(0).webkitEnterFullScreen) {
				console.log("webkitEnterFullScreen");
				$(this).get(0).webkitEnterFullScreen();
			} else {
				console.log("none fullscreen");
				return false;
			}
			return true;
		},
		toggleTargetVisible : function(target) {
			$(this).toggle(function() {
				target.css("visibility", "hidden");
			}, function() {
				target.css("visibility", "visible");
			});
		}
	});
})(jQuery);